<template>
	<view>
		<view class="goods-item" v-for="(item,index) in activeGoodsListByTab" :key="index">
			<goods-list-item :goods="item"></goods-list-item>
		</view>
	</view>
</template>

<script>
	export default {
		name: "goods-list",
		data() {
			return {
				//bug props传入 之后不需要声明data 
				activeGoodsListByTab: []
			};
		},
		props: {
			_activeGoodsListByTab: {
				type: Array,
				default: []
			}

		},
		watch: {
			_activeGoodsListByTab(n) {
				this.activeGoodsListByTab = n
				// console.log('activeGoodsListByTab 有变动', this.activeGoodsListByTab);
			}
		}
	}
</script>

<style lang="less">

</style>
